func void B_SetHeroAbilities (var C_NPC slf, var int color)
{
	slf.attribute	[ATR_STRENGTH] 			= 10;
	slf.aivar		[REAL_STRENGTH]			= 10;
	slf.attribute	[ATR_DEXTERITY] 		= 10;
	slf.aivar		[REAL_DEXTERITY]		= 10;
	slf.attribute	[ATR_MANA_MAX] 			= 10;
	slf.aivar		[REAL_MANA_MAX]			= 10;
	slf.attribute	[ATR_MANA] 				= 10;
	slf.attribute	[ATR_HITPOINTS_MAX] 	= 40;
	slf.attribute	[ATR_HITPOINTS] 		= 40;

	slf.HitChance	[NPC_TALENT_1H]			= 0;
	slf.HitChance	[NPC_TALENT_2H]			= 0;
	slf.HitChance	[NPC_TALENT_BOW]		= 0;
	slf.HitChance	[NPC_TALENT_CROSSBOW]	= 0;

	slf.protection	[PROT_EDGE]				= 0;
	slf.protection	[PROT_BLUNT]			= 0;
	slf.protection	[PROT_POINT]			= 0;
	slf.protection	[PROT_FIRE]				= 0;
	slf.protection	[PROT_MAGIC]			= 0;
	
	Npc_SetTalentSkill (slf, NPC_TALENT_1H,0);
	Npc_SetTalentSkill (slf, NPC_TALENT_2H,0);

	slf.aivar	[AIV_MercLevel]				= 0;
	var int Fraktion; Fraktion = B_GetGuild(color);
	var int SchwertLevel; SchwertLevel = B_GetHeroWeaponLevel(color);
	var int RuestungsLevel; RuestungsLevel = B_GetHeroArmorLevel(color);
	var int Armbrustlevel; Armbrustlevel = B_GetHeroCrossbowLevel(color);
	var int Kills; Kills = B_GetHeroKills(color);
	if (color == BLUE) {
		slf.name = npcname_hero_djg;
	}
	else if (color == RED) {
		slf.name = npcname_hero_pal;
	};
	
	slf.aivar[AIV_Typ] = 4;
	slf.aivar[AIV_Armor] = RuestungsLevel;
			
	if (RuestungsLevel == 0)
	{
		if (Fraktion == DJG) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_SLD_M); }
		else if (Fraktion == PAL) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_MIL_M); }
		else if (Fraktion == TMP) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_TMP_L); }
		else if (Fraktion == SKE) { B_SetSkelettVisual (slf,2); }
		else if (Fraktion == GRD) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_GRD_M); };
	}
	else if (RuestungsLevel == 1)
	{
		if (Fraktion == DJG) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_DJG_L); }
		else if (Fraktion == PAL) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_PAL_M); }
		else if (Fraktion == TMP) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_TMP_M); }
		else if (Fraktion == SKE) { B_SetSkelettVisual (slf,3); }
		else if (Fraktion == GRD) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_GRD_H); };
	}
	else if (RuestungsLevel >= 2)
	{
		if (Fraktion == DJG) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_DJG_H); }
		else if (Fraktion == PAL) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_PAL_H); }
		else if (Fraktion == TMP) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,ITAR_TMP_H); }
		else if (Fraktion == SKE) { B_SetSkelettVisual (slf,4); }
		else if (Fraktion == GRD) { B_SetNpcVisual (slf, MALE,"Hum_Head_Fighter",Face_N_Wolf,BodyTex_N,EBR_ARMOR_H); };
	};
	
	slf.voice = 6;
	slf.npctype = NPCTYPE_MAIN;
	slf.guild = B_CampidToGuild(color);
	if (Fraktion != SKE) { Mdl_SetVisual (slf, "humans.mds"); };
	Mdl_ApplyOverlayMds (slf, "humans_relaxed.mds");
	Mdl_SetModelFatness (slf, 0);
	slf.bodyStateInterruptableOverride 	= TRUE;
	B_CreateAmbientInv (slf);
	slf.senses = SENSE_SEE | SENSE_SMELL | SENSE_HEAR;
	slf.senses_range = 2000;
	B_GiveNpcTalents (slf);
	
	if (SchwertLevel == 0)
	{
		EquipItem (slf, ItMw_Hero_1);		// 60 Schaden
		slf.HitChance	[NPC_TALENT_1H]	= 25;
		slf.HitChance	[NPC_TALENT_2H]	= 25;
		Npc_SetTalentSkill (self, NPC_TALENT_1H,0);
		Npc_SetTalentSkill (self, NPC_TALENT_1H,0);
	}
	else if (SchwertLevel == 1)
	{
		EquipItem (slf, ItMw_Hero_2);		// 105 Schaden
		slf.HitChance	[NPC_TALENT_1H]	= 50;
		slf.HitChance	[NPC_TALENT_2H]	= 50;
		Mdl_ApplyOverlayMds     (slf,    "humans_1hST1.mds");
		Mdl_ApplyOverlayMds     (slf,    "humans_2hST1.mds");
		Npc_SetTalentSkill (self, NPC_TALENT_1H,1);
		Npc_SetTalentSkill (self, NPC_TALENT_1H,1);
	}
	else if (SchwertLevel == 2)
	{
		EquipItem (slf, ItMw_Hero_3);		// 150 Schaden
		slf.HitChance	[NPC_TALENT_1H]	= 75;
		slf.HitChance	[NPC_TALENT_2H]	= 75;
		Mdl_ApplyOverlayMds     (slf,    "humans_1hST2.mds");
		Mdl_ApplyOverlayMds     (slf,    "humans_2hST2.mds");
		Npc_SetTalentSkill (self, NPC_TALENT_1H,2);
		Npc_SetTalentSkill (self, NPC_TALENT_1H,2);
	}
	else if (SchwertLevel >= 3)
	{
		EquipItem (slf, ItMw_Hero_4);		// 190 Schaden
		slf.HitChance	[NPC_TALENT_1H]	= 100;
		slf.HitChance	[NPC_TALENT_2H]	= 100;
		Mdl_ApplyOverlayMds     (slf,    "humans_1hST2.mds");
		Mdl_ApplyOverlayMds     (slf,    "humans_2hST2.mds");
		Npc_SetTalentSkill (self, NPC_TALENT_1H,2);
		Npc_SetTalentSkill (self, NPC_TALENT_1H,2);
	};
	
	var int SkillLevel; SkillLevel = B_GetHeroLevelByKills(kills);
	B_SetAttributesToChapter (slf, SkillLevel);
	if(SkillLevel>=7)		{ slf.fight_tactic = FAI_Human_Master; }
	else if(SkillLevel>=5)	{ slf.fight_tactic = FAI_Human_Strong; }
	else					{ slf.fight_tactic = FAI_Human_Normal; };
	
	if (Armbrustlevel == 1)	{ 
		EquipItem (slf, ItRw_Crossbow_L_02);
		slf.HitChance	[NPC_TALENT_BOW]		= 31;
		slf.HitChance	[NPC_TALENT_CROSSBOW]	= 31;
		Mdl_ApplyOverlayMds(slf,"humans_BowT1.mds");
		Mdl_ApplyOverlayMds(slf,"humans_CBowT1.mds");
	} 
	else if (Armbrustlevel == 2) {	
		EquipItem (slf, ItRw_Crossbow_M_01);
		slf.HitChance	[NPC_TALENT_BOW]		= 54;
		slf.HitChance	[NPC_TALENT_CROSSBOW]	= 54;
		Mdl_ApplyOverlayMds(slf,"humans_BowT1.mds");
		Mdl_ApplyOverlayMds(slf,"humans_CBowT1.mds");
	}
	else if (Armbrustlevel == 3) { 
		EquipItem (slf, ItRw_Crossbow_M_02);
		slf.HitChance	[NPC_TALENT_BOW]		= 77;
		slf.HitChance	[NPC_TALENT_CROSSBOW]	= 77;
		Mdl_ApplyOverlayMds(slf,"humans_BowT2.mds");
		Mdl_ApplyOverlayMds(slf,"humans_CBowT2.mds");
	}
	else if (Armbrustlevel == 4) { 
		EquipItem (slf, ItRw_Crossbow_H_01);
		slf.HitChance	[NPC_TALENT_BOW]		= 100;
		slf.HitChance	[NPC_TALENT_CROSSBOW]	= 100;
		Mdl_ApplyOverlayMds(slf,"humans_BowT2.mds");
		Mdl_ApplyOverlayMds(slf,"humans_CBowT2.mds");
	};
	Mdl_SetModelScale(slf,1.1,1.1,1.1);
	
	if (B_GetWayPartition(color) < WegCounter)
	{
		slf.AIVAR[AIV_Weg] = 1;
	}
	else
	{
		slf.AIVAR[AIV_Weg] = 2;
	};
	if (Map == Varus_Map)
	{
		slf.AIVAR[AIV_Weg] = 2;
		slf.AIVAR[AIV_WayPos] = 0;
	};
};